import Cookies from "js-cookie";

const TokenKey = "Admin-Token";
const nameKey = "admin-name";
const timeKey = "tokenTime";

export function getToken() {
  var token = Cookies.get(TokenKey);
  // console.log(token)
  return token;
}
export function setToken(token) {
  Cookies.set(TokenKey, token);
}

export function getTokenName() {
  return Cookies.get(nameKey);
}
export function setTokenName(name) {
  return Cookies.set(nameKey, name);
}

export function getTokenTime() {
  return Cookies.get(timeKey);
}
export function removeToken() {
  Cookies.remove(nameKey);
  return Cookies.remove(TokenKey);
}
